---
layout: page
---
<div class="category-head">
    {%- assign cat_mapping_title = site.categories_mapping | map:page.title -%}
    <h1 class="title">{{ page.title | upcase }}</h1>
    <p>{{ cat_mapping_title }}</p>
</div>
<div class="category-posts">
    {%- assign tmpYear = '' -%}
    {%- assign tmpMonth = '' -%}
    {%- for post in  page.posts -%}
    {%- assign year = post.date | date: '%Y' -%}
    {%- assign month = post.date | date: '%m' -%}
    {%- assign day = post.date | date: '%d' -%}

    {%- if year != tmpYear -%}
    {%- unless forloop.first -%}
    </ul></li></ul>
    {%- endunless -%}
    <h2 class="head-year" onclick="$(this).next().slideToggle(240)">{{ year }}&nbsp;年</h2><ul class="month-list">     
    {%- endif -%}

    {%- if month != tmpMonth or year != tmpYear -%}     
    {%- unless forloop.first or tmpYear != year -%}
    </li></ul>
    {%- endunless -%}
    <li class="container month">
    <span class="head-month" onclick="$(this).next().slideToggle(240)">{{ month }}&nbsp;月<span class="head-month-post-num"></span></span>   
    <ul class="day-list">
    {%- assign tmpMonth = month -%}        
    {%- endif -%}   

    {%- if year != tmpYear -%}
    {%- assign tmpYear = year -%}   
    {%- endif -%}
    <li>
        <div class="day" onclick="$(this).next().children('div').slideToggle(240)">{{ day }}日: </div>          
        <div class="day-content">
            {%- case post.layout -%}
                {%- when 'media' -%}
                <a class="excerpt" href="{{ post.media.link }}">
                {%- case post.media.type -%}
                {%- when 'qmkg' -%}
                我在「 <span style="color: #ff003a;">全民k歌</span> 」唱了一首
                {%- when 'changba' -%}
                我在「 <span style="color: #ff5047;">唱吧</span> 」唱了一首                       
            {%- endcase -%}
            《{{ post.media.title }}》</a>
            {%- assign post-content  = post.media.content -%}
            {%- when 'post' -%}           
                <span class="excerpt" onclick="$(this).next().slideToggle(240)" >{{ post.post.title }}</span>        
                <div class="day-post-content">    
                    <a href="{{ site.baseurl }}{{ post.url }}"> {{ post.excerpt | strip_html | truncate:150, '...' }}</a>                       
                    <div class="day-post-tags">
                        {%- for tag in post.tags -%}
                        <a href="{{ site.baseurl }}{{ tag | url_encode | downcase | prepend: '/tag/'}}">{{ tag }}</a>
                        {%- endfor -%}
                    </div>     
                </div>             
            {%- endcase -%}        
        </div>                    
    </li>
    {%- endfor -%}
    </ul></li></ul>
</div>